package com.shop.mapper;

import com.shop.model.Goods;
import com.shop.model.common.GoodsShowPage;
import com.shop.model.common.SearchPageGoods;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface GoodsMapper {
    void insert(Goods goods);

    List<Goods> selectAll();

    Integer searchCount(SearchPageGoods searchPage);

    List<Goods> searchPage(SearchPageGoods searchPage);

    void update(Goods goods);

    void updateStatus(Integer id, String status);

    List<Goods> showPage(GoodsShowPage goodsShowPage);

    Integer showPageCount(GoodsShowPage goodsShowPage);

    Goods selectById(Integer id);

    void reduceStock(int goodid, int num);


}
